package extends

import "fmt"

/*
 interface and method
*/
type Phone interface {
	Call()
}

func (nokiaPhone NokiaPhone) Call() {
	fmt.Printf("I am %v, I can call you!\n", nokiaPhone.Msg)
}
func (iPhone IPhone) Call() {
	fmt.Printf("I am %v, I can call you!\n", iPhone.Msg)
}

/*
Object
*/
/*
结构体名
	首字母小写是私有
	首字母大写是共有
*/

type IPhone struct {
	Msg string
}
type NokiaPhone struct {
	Msg string
}
